package com.spring.cloud.module.menu;

import com.google.common.collect.Lists;
import com.spring.cloud.module.common.core.BaseObject;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Created by sunwei on 2015/8/20.
 */
public class Menu extends BaseObject {

    /**
	 * 
	 */
	private static final long serialVersionUID = -6697979295438239538L;

	private String areaName;

    private String loginPage;

    private String mainPage;

    private List<TopMenu> topMenuList  = Lists.newArrayList();

    public void addTopMenu(TopMenu topMenu){
        if(topMenu!=null && Boolean.valueOf(StringUtils.isEmpty(topMenu.getDisplay())?"true":topMenu.getDisplay())){
            this.topMenuList.add(topMenu);
        }
    }

    public List<TopMenu> getTopMenu() {
        return this.topMenuList;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getLoginPage() {
        return loginPage;
    }

    public void setLoginPage(String loginPage) {
        this.loginPage = loginPage;
    }

    public String getMainPage() {
        return mainPage;
    }

    public void setMainPage(String mainPage) {
        this.mainPage = mainPage;
    }
}
